Part Number Hot Search : 
34002 2SD18 TGA1082B T91SAM7 APTGF DA221 SA5225 RT9231
Product Description
Full Text Search
 

To Download ELM325 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ELM325 elm electronics ?circuits for the hobbyist www.elmelectronics.com j1708 interpreter with the advent of electronic engine controls, many vehicles also adopted some form of diagnostic tools to help monitor their operation. as more modules began to be used in vehicles, there was also a need for the devices to share information rather than each independently obtain this from separate sensors. in the 1980?, the sae j1708 standard was created to provide a specification for a common data bus to be used in heavy duty vehicles. it used rs485 wiring (already proven to be reliable in noisy environments), and a uart-based low speed data format. the sae j1587 standard followed a few years later to describe the mechanism by which messages and data should be sent between vehicle modules. the ELM325 allows a pc or similar device to be used to monitor and query devices on a j1708 data bus, using simple commands that can be sent from almost any terminal program. it is able to work with either the j1587 or the j1922 data formats. supports both sae j1587 and j1922 high speed rs232 interface works with standard rs485 transceivers fully configurable with at commands wide operating voltage range (1.8 to 5.5v) low power cmos design diagnostic trouble code readers heavy duty vehicle scan tools teaching aids ecu simulators description applications features 1 of 31 ELM325dsa block diagram connection diagram pdip and soic (top view) v dd v ss ro invde free datasheet http:///
ELM325 elm electronics ?circuits for the hobbyist www.elmelectronics.com 2 of 31 ELM325dsa electrical information copyright and disclaimer............................................................. 2 pin descriptions........................................................................... 3 absolute maximum ratings......................................................... 4 electrical characteristics.............................................................. 4 using the ELM325 overview...................................................................................... 5 communicating with the ELM325................................................ 5 at commands............................................................................. 7 at command summary............................................................... 7 at command descriptions.......................................................... 8 sending at commands............................................................. 11 j1587 commands...................................................................... 12 listening to a vehicle................................................................. 13 receive filtering........................................................................ 14 getting trouble codes............................................................... 15 making requests....................................................................... 16 automatic receive filters.......................................................... 17 setting the mid.......................................................................... 18 multiline responses................................................................... 18 setting the timeout.................................................................... 20 about j1922............................................................................... 21 restoring order.......................................................................... 21 design discussions microprocessor interfaces.......................................................... 22 example applications................................................................. 23 tester connectors...................................................................... 27 misc error messages and alerts......................................................... 28 outline diagrams....................................................................... 29 ordering information.................................................................. 29 index.......................................................................................... 30 contents all rights reserved. copyright 2012 by elm electronics inc. every effort is made to verify the accuracy of information provided in this document, but no representation or warranty can be given and no liability assumed by elm electronics with respect to the accuracy and/or use of any products or information described in this document. elm electronics will not be responsible for any patent infringements arising from the use of these products or information, and does not authorize or warrant the use of any elm electronics product in life support devices and/or systems. elm electronics reserves the right to make changes to the device(s) described in this document in order to improve reliability, function, or design. free datasheet http:///
ELM325 elm electronics ?circuits for the hobbyist www.elmelectronics.com pin descriptions 3 of 31 v dd (pin 1) this pin is the positive supply pin, and should always be the most positive point in the circuit. internal circuitry connected to this pin is used to provide power on reset of the microprocessor, so an external reset signal is not required. refer to the electrical characteristics section for further information. xt1 (pin 2) and xt2 (pin 3) a 3.579545 mhz oscillator crystal (often known simply as a ?.58 mhz?crystal) is to be connected between these two pins. loading capacitors as required by the crystal (typically 27pf) also need to be connected from each of these pins to circuit common (vss). a crystal is preferred, but you may also use a ceramic resonator. note that this device has not been configured for operation with an external oscillator, and it expects a crystal or resonator to be connected between these pins. use of an external clock source is not recommended. invde (pin 4) this input is used to invert the output at the de pin. this allows the ELM325 to be connected to a variety of rs485 interface circuits without the need for an external inverter. normally, the invde pin is connected to a high (v dd ) level. this causes the de output (pin 11) to be at a low level during idle, and go to a high level for the start bit (ie. when active). this is required for most rs485 interface ics such as the 75176, ds485, ltc485, adm485, max485, and sn65hvd3080e. if you are using a device that requires an active low de output (such as the ds36277), then connect the invde pin to a low level. rs232 rx (pin 5) this is the rs232 (serial) data receive input. the signal level is compatible with most interface ics (when at idle, the level should be high), but can be used with other interfaces as well, since the input has schmitt trigger input wave shaping. rs232 tx (pin 6) this is the rs232 (serial) data transmit output. the signal level is compatible with most interface ics (the output is high when idle), and there is sufficient current drive to allow interfacing using only a pnp transistor, if desired. rs rx led (pin 7), rs tx led (pin 8), j rx led (pin 9) and j tx led (pin 10) these four pins normally output a high level, and are driven low when the ELM325 is transmitting or receiving data. the internal circuitry is suitable for directly driving most leds through current limiting resistors, or interfacing to other logic circuits. when using lower v dd levels, the led should be chosen so that the forward voltage drop is not more than the supply level. if unused, these pins should be left open-circuited. de (pin 11) this is the j1708 transmit data output, which should be connected to the de pin on an rs485 transceiver integrated circuit. the polarity of this signal may be changed by changing the level on the invde pin. re (pin 12) this is a receiver enable output, which may be used to enable or disable the rs485 receiver. for some circuits this might result in a substantial reduction in current, if the receiver is not being used. this pin is set to a low level on powerup, or ELM325 reset. the level may be controlled with the at re0 and re1 commands. if unused, this pin should be left open-circuited. ro (pin 13) this is the j1708 receive data input, and should be connected to the receive output (ro) pin of the rs485 transceiver ic. this is a standard cmos input that accepts ttl level signals. v ss (pin 14) circuit common must be connected to this pin. ELM325dsa free datasheet http:///
elm electronics ?circuits for the hobbyist www.elmelectronics.com absolute maximum ratings storage temperature....................... -65? to +150? ambient temperature with power applied.................................... -40? to +85? voltage on v dd with respect to v ss ..... -0.3v to +6.5v voltage on any other pin with respect to v ss ........................... -0.3v to (v dd + 0.3v) note: these values are given as a design guideline only. the ability to operate to these levels is neither inferred nor recommended, and stresses beyond those listed here will likely damage the device. 4 of 31 ELM325dsa ELM325 electrical characteristics notes: 1. this integrated circuit is based on microchip technology inc.? pic16f1823 device. for more detailed device specifications, and possibly clarification of those given, please refer to the microchip documentation (available at http://www.microchip.com/). 2. this spec must be met in order to ensure that a correct power on reset occurs. it is quite easily achieved using most common types of supplies, but may be violated if one uses a slowly varying supply voltage, as may be obtained through direct connection to solar cells or some charge pump circuits. 3. ELM325 device only ?does not include any load currents all values are for operation at 25? and a 5v supply, unless otherwise noted. for further information, refer to note 1 below. characteristic minimum typical maximum conditions units supply voltage, v dd 1.8 5.0 5.5 v v dd rate of rise 0.05 v/ms average current, i dd 1.2 ma 8.0 ma output low current output high current see note 2 v out = 0.6v max 3.5 3.0 j1708 baud rate rs232 baud rate reset time 900 msec bps bps 57600 9600 v dd = 5.0v 0.75 msec see note 3 v dd = 3.3v v dd = 5.0v v dd = 3.3v 6.0 ma ma v out = 4.3v min ma v out = 2.6v min v out = 0.6v max measured from the end of the command to the start of the id message (ELM325 v1.0) 2.0 at z at ws free datasheet http:///
5 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com communicating with the ELM325 the ELM325 expects to communicate with the controlling device through an rs232 serial connection. although most modern devices do not usually provide a serial connection such as this, there are several ways in which a ?irtual serial port?can be created. the most common devices are usb to rs232 adapters, but there are several others such as wi-fi modules, ethernet devices, or bluetooth to serial adapters. no matter how you physically connect to the ELM325, you will need a way to send and receive data. the simplest method is to use one of the many ?erminal?programs that are available (hyperterminal, zterm, etc.), to allow typing the characters directly from your keyboard. to use a terminal program, you will need to adjust several settings. first, ensure that your software is set to use the proper ?om?port, and that you have chosen the proper data rate ?the ELM325 can only communicate at 57600 bps. if you select the wrong ?om?port, you will not be able to send or receive any data. if you select the wrong data rate, but the right ?om?port, the information that you send and receive will be unreadable by you or the ELM325. don? forget to also set your connection for 8 data bits, no parity bits, and 1 stop bit, and to set it for the proper ?ine end?mode. all of the responses from the ELM325 are terminated with a single carriage return character and, optionally, a linefeed character (depending on your settings). properly connected and powered, the ELM325 will energize the four led outputs in sequence (as a ?amp test? and will then send the message: ELM325 v1.0 > in addition to identifying the version of this ic, receiving this string is a good way to confirm that the computer connections and terminal software settings are correct (however, at this point no communications have taken place with the vehicle, so the state of that connection is still unknown). the > ?character that is shown on the second line is the ELM325? prompt character. it indicates that the device is in the idle state, ready to receive characters on the rs232 port. if you did not see the identification string, try resetting the ic again with the at z (reset) command. simply type the letters a t and z (spaces are optional), then press the return key: >at z that should cause the leds to flash again, and the identification string to be printed. if you only see strange looking characters, then check your baud rate ?you have likely set it incorrectly. characters sent from the computer can either be intended for the ELM325? internal use, or for reformatting and passing on to the vehicle. the ELM325 can quickly determine where the received characters are to be directed by monitoring the contents of the message. commands that are intended for the ELM325? internal use will begin with the characters ?t? while messages for the vehicle are only allowed to contain the ascii codes for hexadecimal digits (0 to 9 and a to f). whether it is an ?t?type internal command or a hex string for the j1708 bus, all messages to the ELM325 must be terminated with a carriage return character (hex ?d? before it will be acted upon. the one exception is when an incomplete string is sent and no carriage return appears. in this case, an internal timer will automatically abort the incomplete message after about 20 seconds, and the ELM325 will print a single question mark (?? to show that the input was not understood (and was not acted upon). messages that are not understood by the ELM325 (syntax errors) will always be signalled by a single overview the following describes how to use the ELM325 to obtain information from your vehicle. we begin by discussing just how to ?alk?to the ic using a pc, then explain how to change options using the ?t?commands, and finally we show how to communicate with a vehicle. for the more advanced experimenters, there are also sections on how to use some of the other features of this product as well. using the ELM325 is not as daunting as it first seems. many users may never need to issue an ?t command, adjust timeouts, or change the mid. for those that do want to make changes, all that is required is a pc or smart device with a terminal program (such as hyperterminal or zterm), and a little knowledge free datasheet http:///
communicating with the ELM325 (continued) question mark. these include incomplete messages, incorrect at commands, or invalid hexadecimal digit strings, but are not an indication of whether or not the message was understood by the vehicle. one must keep in mind that the ELM325 is a protocol interpreter that makes no attempt to assess the content of messages for validity ?it only ensures that hexadecimal digits were received, combined into bytes, then sent out the j1708 port, and it does not know if a message sent to the vehicle was appropriate or not. while processing j1708 messages, the ELM325 will continually monitor for an rs232 character received. if it sees one, this will interrupt the ic, quickly returning control to the user. since the time to respond varies with what the ELM325 was doing at the time, software should always wait for the prompt character ( > ?or hex 3e) to be received, before beginning to send the next command. finally, it should be noted that the ELM325 is not case-sensitive, so the commands ?tz? ?tz? and ?tz?are all exactly the same to the ELM325. all commands may be entered as you prefer, as no one method is faster or better. the ELM325 also ignores space characters and all control characters (tab, etc.), so they can be inserted anywhere in the input to improve readability. one other feature of the ELM325 is the ability to repeat the last command when only a single carriage return character is received. this may be convenient if you have sent a command and wish to repeat it in order to obtain updates. if you simply send a carriage return, then you do not have to resend the entire command. the memory buffer only remembers one previous command though ?there is no provision in the current ELM325 to provide storage for more. 6 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com free datasheet http:///
several parameters within the ELM325 can be adjusted in order to modify its behaviour. these do not normally have to be changed before attempting to talk to the vehicle, but occasionally the user may wish to customize these settings ?for example by turning the character echo off, or adjusting a timeout value. in order to do this, internal ?t?commands must be used. those familiar with pc modems will immediately recognize at commands as a standard way in which modems are internally configured. the ELM325 uses essentially the same method, always watching the data sent by the pc, looking for messages that begin with the character ??followed by the character ?? if found, the next characters will be interpreted as an internal configuration or ?t?command, and will be executed upon receipt of a terminating carriage return character. if the command is just a setting change, the ELM325 will reply with the characters ?k? to say that it was successfully completed. some of the commands require that numbers be provided as arguments, in order to set the internal values. these will always be hexadecimal digits. also, one should be aware that for the on/off types of commands, the second character is the number 1 or the number 0, the universal terms for on and off. the following is a summary of all of the current ELM325 commands. a more complete description of each command follows, starting on the next page. 7 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com at command summary at commands general repeat the last command d set all to defaults e0, e1 echo off, or on* i print the version id l0, l1 linefeeds off, or on* ws warm start (quick software reset) z reset all other em0, em1 error messages off, or on* r0, r1 responses off, or on* re0, re1 re output pin low*, or high s0, s1 spaces off, or on* st hh set timeout to hh j1708 specific af0, af1 auto formatting off, or on* c0, c1 checksum display off*, or on f1 reset filter 1 f2 reset filter 2 f1 hh hh hh hh hh set filter 1 f2 hh hh hh hh hh set filter 2 gm get message go get one message ma monitor all messages mm hh monitor for mid hh messages mp hh monitor for pid hh messages mp 01hh monitor for page 2 pid hh sm hh set mid to hh sp h set priority to h tc get trouble code messages note: settings shown with an asterisk (*) are the default values free datasheet http:///
8 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com at command descriptions [ repeat the last command ] sending a single carriage return character causes the ELM325 to repeat the last command that it performed. this helps if you wish to repeat a request several times to obtain updates for a monitored value, for example. af0 and af1 [ auto formatting off or on* ] all messages must start with the sender? address (the mid) and end with a checksum. if automatic formatting is on (it is by default), the ELM325 will add these to every message for you, so that you only need to provide the data bytes that you wish to send. if automatic formatting is off, you must provide all bytes, including the mid and the checksum. automatic (ie ?uto? formatting also provides help when making requests for a pid. if you provide one data byte, or two data bytes with the first being 01, the ELM325 assumes that you wish to make a pid request. it will add the mid, the request pid, checksum, etc. for you, set the filters if you haven?, and send the request. if the auto formatting is off, all bytes that you provide are sent without modification of any kind (but the ELM325 still attempts to set filters for you, if you have not set any). one final issue to note is that the ELM325? internal j1708 buffer is 21 bytes long. this means that you may actually send a 23 byte message if formatting is on (mid + 21 bytes in buffer + checksum), but if the auto formatting is off, the total length of the message must be 21 bytes or less (as the entire message is taken from the buffer). it also means that if you try to provide 21 data bytes for a message, plus a message count nibble, you will get an error (as you have over- filled the internal buffer). this is generally of no concern if you are implementing the sae j1587 protocol, but may be an issue if you are trying to send some special sae j1922 messages. c0 and c1 [ checksum display off* or on ] these commands are used to make the received checksum byte visible or not. usually, it is preferred that the byte not be shown, so the ELM325 hides it by default. if you wish to see the byte printed with every message, simply send at c1. d [ set all to defaults ] this command is used to set the options to their default (or factory) settings, as when power is first applied. any settings that you had made for a custom mid, for filters, for message formatting, or timer settings will be restored to their default values. e0 and e1 [ echo off or on* ] these commands control whether or not the characters received on the rs232 port are echoed (retransmitted) back to the host computer. character echo can be used to confirm that the characters sent to the ELM325 were received correctly. the default is e1 (or echo on). em0 and em1 [ error messages off or on* ] if a message is received and there is a problem with it, the ELM325 will add an error description to the received line. an arrow (?? that points to the message is printed first, then either prot error, rx error, or data error is printed to describe the problem. you may find that the description is of little use to you in your application, and wish to only see the ?rrow? if you set at em0, the ELM325 will do that for you. f1 [ reset filter 1 ] if you have set message receive filter f1 and wish to disable that setting, simply send at f1. the ELM325 will discard any setting that you had made. f2 [ reset filter 2 ] if you have set message receive filter f2 and wish to disable that setting, simply send at f2. the ELM325 will discard any setting that you had made. the following describes each at command that the current version of the ELM325 supports, in some detail. many of these commands are also described further in other sections: free datasheet http:///
9 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com at command descriptions (continued) f1 hh hh hh hh hh [ set filter 1 to?] filter f1 can be used to selectively receive only the messages that contain matching bytes in the first five byte positions. simply set the values for the five bytes (ten nibbles) with this command and the ELM325 will make the internal adjustments for you. if there is a nibble that can have any value, then use the letter ??to define it. see the receive filtering section for more details. f2 hh hh hh hh hh [ set filter 2 to?] filter f2 can be used to selectively receive only the messages that contain matching bytes in the first five byte positions. simply set the values for the five bytes (ten nibbles) with this command and the ELM325 will make the internal adjustments for you. if there is a nibble that can have any value, then use the letter ??to define it. see the receive filtering section for more details. gm [ get message ] occasionally, you may wish to set the receive filter for a particular message and ?et?it from the data stream. the at gm command may be used to do so. this command is very similar to at ma with the f1/f2 filters set, except that it respects the at st timeout value. that is, if no message is received in the st time, the ELM325 will return with a no data message, and if multiple messages are received within that time, they will all be displayed. note that f1 and/or f2 must be set prior to using at gm. go [ get one message ] this command performs exactly as the at gm command, except that it only gets one response and then returns immediately to the prompt. i [ identify yourself ] issuing this command causes the chip to identify itself, by printing the startup product id string (currently ?lm325 v1.0?. software can use this to determine exactly which integrated circuit it is talking to, without having to reset the ic. l0 and l1 [ linefeeds off or on* ] this option controls the sending of linefeed characters (0x0a) after each carriage return character (0x0d). users will generally wish to have this option on if using a terminal program, but off if using a custom computer interface (as the extra characters transmitted will only serve to slow the communications down). the default setting is l1 (linefeeds on). ma [ monitor all messages ] this command places the ELM325 into a bus monitoring mode, in which it continually monitors for (and displays) all messages that it sees. if the f1 and f2 filters have not been set, then all messages on the j1708 bus will be displayed. often, it is not desirable to display everything that is being transmitted on the system. if you wish to reduce the amount of information displayed, simply set the f1 and/or f2 filters to the values that you wish to see. then, with at ma, the ELM325 will display all messages that meet that criteria. mm hh [ monitor for mid hh ] the at mm command is similar to the at ma command except that it also filters for only messages that match the mid provided. that is, the at mm command is effectively an extra filter that can be applied to incoming messages. mp hh [ monitor for pid hh ] the at mp command is very similar to the at mm command except that it only allows messages with the provided pid value in the second byte position. again, the f1 and/or f2 filters may be used to further refine the data that is shown. mp 01hh [ monitor for page 2 pid hh ] this command is identical to the previous command except that it filters for page 2 pids (that is, for pids of value 0100 to 01ff). again, f1 and f2 filters can also be used with this command. as an aside, this command actually monitors for 0xff in the second byte position, and for the hh value in the third byte position (which is the way that page 2 pids are defined in the sae j1587 standard). r0 and r1 [ responses off or on* ] these commands control whether the ELM325 will look for a response from the vehicle, after a message has been sent. if responses have been turned off (with free datasheet http:///
10 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com at r0), the ELM325 will not wait for a reply from the vehicle after sending a request ?it will simply say ?k? and will then return immediately to wait for the next command. an r0 setting will always override any ?umber of responses digit?that is provided with a message. r0 may be useful for sending commands blindly when simulating an ecu for demonstration or test purposes. the default setting is r1, or responses on. re0 and re1 [ re output to 0* or 1 ] this command is used to control the state of the re output pin. after a powerup or reset, the ELM325 always sets this pin to a low level. if you send at re1, you will change the output to a high level (ie to v dd ), and at re0 will restore it to a low level (v ss ). while this pin was intended for use with rs485 transceiver ?eceive enable?inputs, it does not need to be used in that way. this control pin functions independently of any internal circuitry so can be used for many other functions, such as disabling peripherals or blinking an led. s0 and s1 [ printing of spaces off or on* ] this command controls whether or not space characters are inserted in the message response. the ELM325 normally formats message responses as a series of two nibbles followed by a space (0x20) character. if you wish to reduce the amount of received data and your pc? processing time, you may wish to turn spaces off. by default, spaces are on (s1), and space characters are inserted in every response. sm hh [ set the mid to hh ] the ELM325 normally assumes that you wish to send using the mid ?c?(which is decimal 172). this value has been assigned by sae j1587 to the #1 off- board diagnostics unit. if you wish to change the mid that the ELM325 uses when sending messages, simply define it with this command. see the ?etting the mid?section for more information. sp h [ set the priority to h ] each message that is sent by the ELM325 has a priority assigned to it. these priorities can have values from 1 (the highest) to 8 (the lowest). the at sp command may be used to change the message priority, but great care must be used with this. it is possible to preempt other more important messages if you change the priority, possibly adversely affecting the operation of the vehicle. do not adjust this parameter if you are unsure of why you are doing so, and what affect it may have. by default, the ELM325 uses a priority value of 8. st hh [ set timeout to hh ] after sending a request, the ELM325 waits a preset time for a response before it can declare that there was ?o data?received from the vehicle. the same timer setting is also used after a response has been received, while waiting to see if any more are coming. the at st command allows this timer to be adjusted, in increments of 100 msec. the st timer is set to 0f (15 decimal) by default, which gives a time of 1.5 seconds. note that sending at st 00 does not result in no time ?it causes the default time to be set. tc [ monitor for trouble code messages ] this command is used to quickly monitor for trouble codes that are being broadcast ?that is, all pids that are equal to c2 (or decimal 194), without having to set the filters. the at tc command uses the at st timer to limit the time that it waits for a message to arrive. ws [ warm start ] this command causes the ELM325 to perform a complete reset which is very similar to the at z command, but does not include the power on led test. users may find this a convenient way to quickly ?tart over?without having the extra delay of the at z command. z [ reset all ] this command causes the chip to perform a complete reset as if power were cycled off and then on again. all settings are returned to their default values, and the chip will be put into the idle state, waiting for characters on the rs232 bus. at command descriptions (continued) free datasheet http:///
sending at commands before learning some j1587 commands, we will show a few examples of how to use an at command. we will assume that you have built (or purchased) a circuit that is similar to that of figure 7 in the example applications section. do not connect your circuit to a vehicle at this time. power it from a test source only (a 9v ?ransistor radio?battery works well), and connect it to your pc as discussed in the communicating with the ELM325 section. for your first command, simply reset the ic by sending at z. try this a few ways (don? forget to press enter or return after each): >at z or >atz or >a t z you should see the rs232 leds blink as you type each letter, and after you press return (or enter) you should see all four tx/rx leds blink, in order, followed by a final blink of the rs232 tx led as the ELM325 sends ?lm325 v1.0? most j1708 messages are continually sent on the data bus, at a predetermined rate. some messages may be sent 10x per second, while others are only 1x per 10 seconds. this means that you may need to adjust the internal timeout setting depending on what message you are attempting to receive. we will adjust this timeout setting next. try this request for trouble codes: >at tc after about 2 seconds, you should see a response that looks like: no data > since there is no vehicle attached, there was no data received. now, adjust the timeout to 10 seconds. if you look at the at command list, you will see that there is a set timeout command that is used for this. timing is in increments of 100 msec (0.1 sec), so to obtain a 10 second delay, the at st setting should be 100. we need to convert the 100 to hexadecimal, however, as all numbers handled by the ELM325 must be in hexadecimal. converting then, 100 (= 6 x 16 + 4) is 64 in hexadecimal, so we send: >at st 64 again, don? forget to press return (or enter). now, the timeout should be set to 10 seconds. to verify this, repeat the trouble codes command: >at tc it should be 10 seconds before you see the no data response this time. to try it again, you do not need to enter the at tc command again, you only need to press enter, and the ELM325 will repeat your last command (at tc) for you. as a final test, enter at tc again, but before the 10 seconds is up, press any key on the keyboard. you should see the ELM325 respond with: stop? which means that it was interrupted and it thinks that you wish to stop. if you ever see the ?top? response, it means that the ELM325 thinks it has been interrupted by you. now, restore the at st time to the default value, with the defaults command: >at d you should see a response of ?k?and then a prompt character on a new line, to show that the ELM325 is waiting for you. in this case, you might also have sent at st 00, since that also restores the timeout setting to its default value. experiment with these commands ?you are not connected to a vehicle, so can do no harm. sending at commands is not difficult, they just require a little practice. 11 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com free datasheet http:///
j1587 commands the sae j1708 standard defines how messages should be sent on what is essentially an rs485 data bus. the actual content of the messages are defined by the sae j1587 standard (and the j1922 standard, too, but it is very similar). our discussion from this point on will be in regard to the j1587 messages only (the ELM325 handles the rest of the conversion process for us). j1587 messages always begin with a single byte called the message id, or mid. it is basically the sender? address (they are always predefined, and no two devices on the bus can have the same mid). the next byte contains a parameter identification number, or pid. it tells you what type of information is contained in the message. one or more data bytes follow the pid and are the actual content of the message being sent. several pid/data groups can be contained in a single message as long as there are no more than 19 bytes of data used (that is, the message must be 21 bytes or less in length). if multiple groups of data are transmitted in one message, there needs to be a way to separate them when received, and the sae j1587 standard sets out how this is done. pids 00 to 7f (ie 0 to 127), always have one data byte only, while pids 80 to bf (128 to 191) have two data bytes. pids c0 to fd (192 to 253) can have a variable number of data bytes ?the number is always given in the first byte following the pid. the pattern repeats again for the page 2 pids (0100 to 017f have one byte, 0180 to 01bf have two, etc.) pid fe (ie 254) is a special one called the data link escape pid. the data contained within that message is manufacturer specific. finally, pid ff (ie 255) is used to signal that all the pids in that message are in page 2. that is, pids are always defined with one byte, modulo 256. to say that all of the pids referred to in the message are actually in the range 0100 to 01ff (256 to 511), the first pid (ie. the second byte in the message) will be ff (255). the final byte of a message, after all the pid and data groups, contains a checksum. this helps the receiver to detect if errors have occurred in the data that is received. the ELM325 does not normally show this byte when receiving a message, but you can have it displayed if you send the at c1 command. figure 1 below shows pictorially how a j1587 message is formed. if you wish to learn more about the sae j1587 standard, you may purchase a copy from www.sae.org. 12 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com figure 1. the sae j1587 message structure mid pid data for the pid pid data . . . pid data checksum maximum 19 bytes more than one pid group is allowed free datasheet http:///
listening to a vehicle before we begin, it should be noted that the ELM325 always uses hexadecimal numbers when communicating with the pc. that is, while the j1587 standard may talk of engine #1 being assigned a mid of 128, the ELM325 always uses 80 for that same address. if you are not familiar with the hexadecimal numbering system, you should review it before proceeding. listening to a vehicle with the ELM325 is exactly the same as with the other elm obd ics ?simply tell the ic that you want to monitor all data: >at ma and the chip will begin displaying all the data that it sees. (if you are connected to a ?ive?vehicle, but are not seeing data, you may have reversed the polarity of your j1708 connections.) to stop the flow of data, simply press any key on the keyboard. perhaps this is too much data and you wish to only see data being sent by the engine. you may easily monitor for only that mid, by sending: >at mm 80 and you should then only see data that begins with mid 80. note that the ELM325 does not show the checksum by default ?you need to tell it to show that byte. for example, monitoring for mid 80 might show: >at mm 80 80 5c 66 be e0 2e 80 b7 40 06 5c 64 be 30 2f 80 5c 64 be 30 2f etc. if you wish to see the checksum byte, send at c1 then monitor for mid 80: >at c1 ok >at mm 80 80 5c 66 be e0 2e f2 80 b7 40 06 5c 64 be 30 2f a6 80 5c 64 be 30 2f a3 etc. while other j1587 monitors tend to always show the checksum, the ELM325 hides it by default (as it doesn? really help in assessing the data). just what is the information contained in these messages? if you look at the first line that was received (with the checksum turned off), you can break it into components as follows: 80 5c 66 be e0 2e mid (engine #1) pid 5c (% load) pid be (rpm) the first byte (80) represents the engine #1 mid, while the second byte is always a pid (5c in this case). since 5c is in the range from 00 to 1f, there is one data byte following the pid (the 66) before the next pid begins. the next pid is then be, which is in the range 80 to bf so it should have two data bytes associated with it (which it does). what does this data mean? well, 5c is equivalent to 92 in decimal. looking up this pid in j1587, one finds that it is for the % engine load, and each digit represents 1/2 %. converting 66 to decimal gives 102, so the % engine load is 102 x 1/2% = 51%. the second pid is be (190 decimal), which is for engine speed, with each digit representing 1/4 rpm. simple enough, but how do you interpret the two data bytes? ie should they be e02e or 2ee0? it turns out that the j1587 standard uses what is known as ?ittle endian?data representation, so the first byte that you see is the least significant (little) one. the engine rpm data should be interpreted as 2ee0, or 12000 decimal. with 1/4 rpm per digit, the speed is then 3000 rpm. the other lines received (or other messages) can be analyzed in a similar fashion. start with the first pid, and work your way through. if the first pid happens to be ff, you will need to start with the next byte (the third one), and you must then treat all pids in the message as if they are page 2 pids (ie in the range from 0100 to 01ff, or 256 to 511). that? about all there is to interpreting the data received. it is almost essential to get a copy of the sae j1587 standard if you are going to do much interpreting of the data, as there are hundreds of mids and pids that are defined in it. 13 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com free datasheet http:///
receive filtering the ELM325 is also capable of monitoring for a particular pid, instead of for a mid as we showed in the previous section. for example, if you would only like to see messages with 5c in the first pid position, you might send: >at mp 5c and the ELM325 would display only messages that it receives that have 5c in the second byte position, such as: 80 5c 66 be e0 2e 80 5c 64 be 30 2f etc. note that the current version of the ELM325 only displays pids that are in the second byte position and is not able to follow the pid chain. that is, it can not detect the pid 5c in a message such as this: 80 b7 40 06 5c 64 be 30 2f you will need to manually assess messages that contain multiple pids, or write software to do so. when monitoring for page 2 pids, the procedure is very similar. for example, to monitor for engine oil level (pid 366 or hex 016e), simply send: >at mp 016e (don? worry about the extension pid as the ELM325 takes care of that for you). being able to monitor for a pid or a mid may be helpful at times, but it would often be more helpful to monitor for both a mid and a pid. you can not do this with the at mm and at mp commands, but you can by setting a receive filter. the ELM325 has two special purpose receive filters built in. these filters act on every received message, and only allow messages with matching bytes to pass. both f1 and f2 allow a five byte pattern to be defined. what if you would like to see a range of values, so do not wish to define all five bytes of the pattern? is it possible to define only the mid and the pid and let messages that match those bytes pass? certainly. simply tell the ELM325 that you do not care about those extra bytes (by providing an ??for each nibble that you do not care about). for example, to filter for all messages that are from mid 80, and contain a 5c in the first pid position, simply say: >at f1 80 5c xx xx xx from that point on, all received messages must start with 80 5c, or they will be discarded. note that this will pass messages of two or more bytes in length (not including the checksum byte), since you told the ELM325 that you did not care what values the other bytes had, if any. since this filter will act on all received messages, 14 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com figure 2. filter logic bit logic free datasheet http:///
getting trouble codes trouble (diagnostic) codes are usually broadcast over the j1708 network so that all devices can know of problems. they will be transmitted when a problem is first discovered, while it is active, and when it clears. for this reason, all that you should normally have to do is monitor for the trouble code pid (it is c2 or decimal 194). since this is likely to be a very common use of the ELM325, we have built in a special function just for this. to monitor for currently active trouble codes, simply send the command: >at tc and the ic will configure the filters that you need for receiving them. note that if you have defined the filters previously for another function, the ELM325 will not change your settings. it will instead treat this command as if you had entered at gm, so be careful. if there are no trouble codes found in the time set by the at st timer, the at tc command will return with a response of ?o data.?if there are trouble codes found, they will be printed out for you. the at tc command doesn? do anything that you can not do, it just saves a few steps for you. if you wish to do exactly as the tc command does, try this: >at f1 xx c2 xx xx xx >at f2 xx c0 xx c2 xx >at gm the filtering for c0 in the f2 setting is done so that any long responses (multi section parameter ids) will also be detected and displayed. the at gm command is actually quite a handy one to use when you wish to look for specific messages on the j1708 bus. simply set the filters as required, ensure that the at st timer is set properly (some pids are only broadcast every 10 seconds), and then send at gm. of course, you could also set the filters and then use the at ma command, but that command does not time out ?you must manually stop it by pressing a key on the keyboard (or sending one from your program). the at gm command will stop waiting for a message after the at st time, which is often more useful. a variation of this command, the get one (at go) is also very useful as it acts exactly like at gm, except that it only gets one response before returning immediately to the prompt. we have discussed the monitoring for trouble codes that are being broadcast over the network, but what if you should wish to actually ask the modules for trouble codes? you can do this easily as well ?all you need to do is send a request like this: >c2 and the ELM325 will return with either a response from the mid(s), or it will will say ?o data? the sending of requests such as this is discussed further in the next section (making requests). 15 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com receive filtering (continued) you may use it with any of the at commands that are available. for example, to see all messages that the j1708 receiver logic is now passing, simply send: >at ma of course, you may still use at mm or mp when a filter has been defined, but then the received message must also meet the mm or mp condition. as shown in figure 2, the ELM325 also contains a second filter that you may define in exactly the same way. if a second filter is defined, then messages that meet either the f1 or the f2 criteria are allowed to pass on (and if neither filter has been defined, all messages will be allowed to pass). there are a few more examples of how to define these filters in the next section (getting trouble codes) and also in the automatic receive filters section. creating filters is not very difficult if you know what you expect the received message to ?ook?like. free datasheet http:///
16 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com making requests using the ELM325 to send messages on the j1708/j1587 bus is very similar to sending obd messages with our other products (the elm327, etc.). simply provide the data bytes that you want sent and the ELM325 takes care of the details for you. for example, assume that you wish to send the bytes 11 22 33 44 for some reason. simply provide them to the ELM325 from the prompt: >11 22 33 44 and the ic will add the mid and checksum for you before sending the entire message. you can provide as many as 21 data bytes (42 digits) to be sent in this manner. as a another example, assume that you wish to make a request for pid be data (this is the engine rpm pid that was discussed previously). pid 00 is used to request a parameter, so to request parameter be, simply send: >00 be the ELM325 adds your mid for you, as well as the checksum at the end, then transmits the entire message. note that the mid and checksum are only added if you have left the auto formatting on ?if you have turned it off, only the bytes that you provide will be transmitted. similarly, if you wish to obtain % engine load (also discussed previously), then send: >00 5c what if the information being requested is currently being broadcast regularly, and you only wish to see one message in response, not many? the ELM325 allows you to specify a single digit for the number of responses that you wish to see. just add it after the bytes. for example, to see only one response for the above request, send: >00 5c 1 and the ic will return with a prompt after receiving only one message. the count that you provide is a hex digit, and can have values from 0 to f. since these requests for parameters may be very common, we have simplified matters a little for you. the ELM325 always monitors what you are sending, and if it finds that you are sending a single byte only (while auto formatting is on), it will assume that you are making a request for a parameter, and it will add the 00 for you. that is, to request parameter be, simply send: >be and to obtain only 1 response for parameter 5c, send: >5c 1 the page 2 parameters normally add a little complexity to your sending, but with the ELM325? automatic formatting, they are again just a matter of entering the pid number. to request the engine oil level (pid 016e), simply send: >016e and if you wish to limit the number of responses to say 3, send: >016e 3 note that the automatic formatting will only change your data bytes if you send a single byte or two bytes that begin with 01. all other messages will remain unaffected, and will be transmitted exactly as provided. this of course leads to the question ?ut what if i want to send a single byte message, or a two byte message that begins with 01?? then you will need to turn the automatic formatting off and send the entire message yourself (you will need to provide the mid and the checksum too). fortunately, it would be a very special case if you wanted to send only a pid number or if you wanted to send a single byte with pid 01 (which has been discouraged since pids 194 to 196 were introduced in 1988). the above said to simply send a few bytes and all would be well, if the auto formatting was on. but how does the ic know what messages to look for in the response? that is, what about setting the filters so that the ELM325 can selectively receive only the desired response? that is taken care of for you too, even if the auto formatting is off. the next section discusses this. free datasheet http:///
automatic receive filters the ELM325 receiver always accepts bytes from the j1708 data stream, and then decides if they should be passed on to the other logic, or discarded. this decision to pass the messages on or not is done with selective logic called filters. you can set these selective filters yourself (see the receive filtering section), or allow the ELM325 to do it for you. if you do not set either receive filter, and send a message, the ELM325 will choose filter settings for you based on the content of your message (the automatic formatting does not have to be on for this to happen). the settings may not be perfect for every situation, but they will be acceptable for most. the chart in figure 3 shows what the settings will be for different messages that you might send. if you do not agree with the filter settings that the ELM325 chooses for you, then simply define your own, using the at f1 and at f2 commands. also if you 17 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com have already chosen filters, and would now prefer that the ELM325 choose them for you, then turn off the filter(s) that you have enabled. to turn off filter 1, for example, send the following: >at f1 note that there are no parameters provided with this command ?just the at and the f1. similarly, disabling f2 is done with at f2. seeing how the ELM325 sets its filters should at least provide a starting point, if you are looking for specific data. with a little experimentation, you will find that it is not that difficult to set the filters, and so limit what is printed by the ELM325. figure 3. filter settings when sending messages to the ecu pid request the send data looks like... filter 1 filter 2 mid 00 pid xx pid xx xx xx description mid ff 00 pid extended pid request (page 2) mid 80 pid rxmid rxmid pid xx xx xx component specific (page 1) mid ff 80 pid rxmid rxmid ff pid xx xx component specific (page 2) mid c3 03 rxmid pid rxmid c4 xx xx xx diagnostic data request (data that does not match any of the above) all other requests xx c0 xx pid xx xx ff pid xx xx xx ff c0 xx pid rxmid c0 xx c4 xx (not used) xx xx xx xx xx rxmid c0 xx pid xx rxmid ff c0 xx pid free datasheet http:///
setting the mid the message id (mid) is a single byte value that is assigned by the sae truck and bus low speed communications network subcommittee. no two transmitters on the network may use the same id, so for this reason, care should be used if you are experimenting with different values of it. the ELM325 uses the mid for the ?ff-board diagnostics #1?device by default. that is hex value ac, or decimal value 172. if you wish to send messages using another mid, it is easily done with the set mid command. for example, to use b4 (decimal 180) which is for the off-board diagnostics #2 unit, then simply send the set mid command: >at sm b4 every message that the ELM325 sends from that point (as long as auto formatting is on) will use the mid b4, instead of ac. of course, you could also 18 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com there are occasions when a vehicle must respond with more information than is able to fit in a single ?essage? in these cases, it responds with several data frames which the receiver must assemble into one complete response. the following shows how this is done with the sae j1587 protocol. figure 3 of the automatic receive filters section showed that the ELM325 looks for two types of responses to a pid request. in the first, the requested pid number appears in the very first data byte position. this is the standard reply where a response of 1 to 18 data bytes may be expected. the second response that it looks for is one where the data begins with the hex digits c0. the c0 pid is a special one that is used to signify that the response is a special multisection one, and that the total number of data bytes will be something greater than 18. figure 4 on the next page describes how the c0 pid encodes the data contained. the very first message (ie. section 0) has one extra byte to show how many bytes in total are in the response. the next lines received are identical to the first, except that they do not have this one byte (and so have room for one more data byte). in total, there can be as many as 15 sections in one message, so the maximum number of data bytes that can be sent in this way is 14 + 15 x 15 = 239 . if a vehicle needs to send more than that, the j1587 protocol has made provision for it with the transport protocol. while the ELM325 does not explicitly support the transport protocol in firmware, you can support it with software (you will need one filter to watch for c5? and the other to get c6?). the diagram in figure 4 makes it fairly easy to see what each byte is doing, but again, you may wish to refer to the sae standard for more complete details. we?l just add a few notes for some of the more subtle points: the ELM325 does not assemble these messages for you ?it must be done manually or with software. there may be more than one mid responding to a request for a pid. the segments are all sent in sequence, and you can not request random resends. pretend to be an engine or transmission, but you would almost certainly cause problems, unless you were in a teaching situation, with controlled conditions. the mid assigned in this way stays in effect until the ELM325 restores its default values. this could be through the use of the at d command, through at ws or at z, or from a power off and on. this version of the ELM325 does not provide programmable parameters (like the elm327 or the elm329), so a preferred value (other than ac) can not be stored in eeprom. multiline responses free datasheet http:///
19 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com multiline responses (continued) c0 n pid sections bytes data . . . data checksum mid sender? id # of bytes following in this message (17) multi section pid the pid that was requested total # of data bytes in all sections 14 data bytes the first section: all the other sections: figure 4. the multisection response c0 n pid sections data . . . data checksum mid # of bytes following in this message (3 to 17) 1 to 15 data bytes this needs to be viewed as two nibbles: this section # the last section # free datasheet http:///
ELM325 20 of 31 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com setting the timeout users often ask about how to obtain faster scanning rates when obtaining information from a vehicle. there is no definite answer for all vehicles, but you can improve the response rate if you understand the ELM325 internal timing process. a typical vehicle request and response is shown here: the ELM325 sends a request then waits up to 1.5 seconds for a reply. if no reply arrives in that time, an internal timer stops the waiting, and the ELM325 prints ?o data? even after a reply has been received, the ELM325 must wait to see if any more replies are coming (and it uses the same internal timer to stop the waiting if no more replies arrive). while most replies should be received within the default 1.5 seconds, the setting is adjustable so that you can cater to almost every situation. (it can be adjusted in increments of 100 msec from 0.1 sec to 25.5 sec.) as an example, consider a vehicle that responds to a query in 100 msec. with the st timeout set to 1.5 sec, the fastest scan rate possible would only be about 1 query every 1.6 seconds, since the ic always waits for that extra 1.5 seconds after receiving a response. changing the st timer setting to 200 msec would make the ic and the vehicle seem much more responsive, as the total time taken would only be about 300 msec (but it would miss any messages that take longer than 200 msec to appear). it is not easy to determine how long it takes for a vehicle to respond to requests, so it may require a bit of experimentation to find a setting that works well for you. setting the timeout too low may also mean that some important information (ie. trouble codes) may be missed, since they are often broadcast every second, so be careful (we have chosen the setting of 1.5 seconds purposely to ensure that messages such as trouble codes are easily detected). if you want to set the timer to a low value, but do not want to set it too low (and miss some responses), then what is to be done? one option is to decide how many replies would be adequate (usually 1), and include that in your query. that is, instead of sending say: >be for the engine rpm, send: >be 1 instead. that way, the ELM325 will send the request, set the timeout timer to 1.5 seconds (or whatever the at st time has been set to), and will then look for one response. if a response never arrives, you will see a ?o data?message, but if a response is obtained, the ELM325 will return immediately to the prompt state, ready for another command. by adding the number of responses to a message, you always eliminate the final wait while the ELM325 sees if any more responses are coming. this means that every response is effectively shortened by that st time. the single digit can have a value of 0 to f, and may follow any hex bytes that you send (it doesn? work with at commands). note that the at go command actually uses a setting of 1, so it obtains one response and returns immediately. this might be useful when polling for some data. since you may encounter messages that are only broadcast every 10 seconds, you may have to adjust the at st timer in order to see them. you should not be reluctant to do so, however, as this does not mean that the ELM325 always takes that much time, if you provide the number of responses to get. ELM325 vehicle request is sent response elm waits up to 1.5 sec elm waits 1.5 sec for more responses free datasheet http:///
ELM325 21 of 31 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com restoring order there may be times when the ELM325 settings have been adjusted, and it? not responding properly. perhaps you are not sure of the present settings (but you do know that you were getting responses before, and are now not seeing any). perhaps you have told the ELM325 to monitor all data, and there are screens and screens of data flying by. the ELM325 can always be interrupted from a task by a single keystroke from the keyboard. as part of its normal operation, the ELM325 constantly checks for any received characters on the serial port, and if found, it will stop what it is doing at the next opportunity. this may mean that it will continue to send the information for the current line, then stop, print a prompt character, and wait for your input. the stopping may not always seem immediate if it has just begun printing a line, for example, so be patient. there may be times when the problems seem more serious and you don? remember just what you did to make them so bad. perhaps you have ?djusted the timer, and experimented with the filters, or perhaps tried to see what happens if the mid byte is changed. to reset only the filters to their initial state, simply send: >at f1 then >at f2 and the ELM325 will remove any settings that you have made to either filter. if the problem is a little more involved than this, then all of the settings can be reset by sending the ?et to defaults?command: >at d this is usually enough to restore order, but of course it removes all of the settings that you have made (echo, linefeeds, etc), so should only be used when you truly want all the settings to be restored to their default values. if the at d command still does not bring the expected results, it may be necessary to do something more drastic ?like resetting the entire ic. there are a few ways that this can be performed with the ELM325. one way is to simply remove the power and then reapply it. another way that acts exactly the same way as a power off and then on is to send the full reset command: >at z it takes approximately one second for the ic to perform this reset, initialize everything and then test the four status leds in sequence. a much quicker option is available, however, if the led test is not required ?the ?arm start?command: >at ws the at ws command performs a software reset, restoring the same items as at z, but it does not perform the led test. about j1922 sae j1922 is another standard that may be used by heavy duty trucks and busses. the data format is similar enough to j1587 that you may use your ELM325 circuit with it. j1922 uses a number of predefined messages for communicating status and performing various control functions. these are either broadcast at a regular rate, or provided on demand, just like j1587. unlike j1587, they do not use pids for defining functions though they do that with the mid byte. the j1708 standard defines mids 45 to 56 (ie. 69 to 86 decimal) for use with j1922). the messages may be from 2 to 23 bytes in length with j1922 (21 data bytes are actually allowed by j1708 if the vehicle? engine is not running, and it? not moving). this is not an issue with the ELM325, as it is capable of receiving an unlimited number of bytes, and is able to send as many as 21 data bytes (23 total) if the automatic formatting is on. when monitoring for j1922 messages, use the same commands as you would with j1587 ?ma, mm, gm, etc. will all work. note that at mp will still work too, but it will filter for the first data byte (which is likely of minimal use). the only concern might be that if you are sending messages and looking for responses, you may have to define your own f1 and f2 filters (see the receive filtering section for more information on this). free datasheet http:///
22 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com many applications will require that the ELM325 interface directly to a microprocessor, and not connect to a pc. this is not a problem, especially if you use the same power supply for both circuits. the ELM325 is actually a microprocessor that contains a standard uart type interface, connected to the rs232 tx and rx pins. the logic type is cmos, and this is compatible with virtually all ttl and cmos circuits, so you should be able to connect directly to these pins, provided that the two devices share the same power supply (5v, 3.3v, etc - it does not matter). the normal (idle) levels of the ELM325 transmit and receive pins are at the v dd level. almost all microprocessors and rs232 interface ics expect that to be the idle level, but you should verify it for your microprocessor before connecting to the ELM325. the connections are straightforward ?transmit connects to receive, and receive connects to transmit, as shown in figure 5 below. don? forget to set both devices to the same baud rate (57.6k). your microprocessor and the ELM325 should not be physically more than about 10 to 20 inches apart, as cmos circuits are subject to latchup from induced currents, and this may be a problem if you have too much separation. if you must have a large distance between your circuits, consider placing 1k w resistors at the rx and the tx pins of both the ELM325 and the microprocessor. that is, put 2k w of resistance in series with each lead, with half of each resistance (1k w ) physically located as close to each ic as possible. by limiting the current available, you should be able to reduce the chance of a latchup. that? about all there is to connecting the ELM325 to a microprocessor ?simply share the supplies and watch your wiring lengths. microprocessor interfaces the ELM325 and your microprocessor must use the same v dd supply your microprocessor tx rx v dd 325 1 2 3 4 5 6 7 8 9 10 11 12 13 14 tx rx v dd v dd figure 5. microprocessor direct connection free datasheet http:///
23 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com example applications to use the ELM325 in a circuit requires only a few interface components and a power supply, as shown in figure 7. the circuit obtains its power from the j1708 (vehicle) interface. the pins labelled a, b, c, etc. refer to the connections on standard ?eutsch?connectors (refer to the section ?ester connectors?for more on them). as shown, battery positive is connected through diode d1 to a standard 7805 regulator, which in turn provides the 5 volt supply for the entire circuit. the ELM325 can operate over a wide range of voltages, but 5 volts is a standard, and readily available value. strictly speaking, diode d1 is not required for circuit operation, but it is a good idea to add it in order to protect against reversed connections. while the j1708 pin connections are now standardised, early ones were not and you never know if there might be one with a reversed connection to the battery (terminals c and e on the 6 pin. the 7805 ic is typically able to withstand 35v at it? input without damage, but not all regulators are this capable. when choosing your regulator, be sure to make sure that the input is able to withstand higher battery voltages (not just rated voltage, but also the spikes that occur due to loads being ?umped? etc.). as to current carrying capacity, the 7805 regulator is more than adequate for supplying this circuit (a 78m05 would do too), it is fairly inexpensive, and it is readily available. figure 7 shows a ?ower on?led (l5) connected between the output of the 7805 regulator and circuit common. this provides an indication that voltage is present, which is generally a good thing to provide in a circuit such as this. another alternative might be to connect the led and resistor between 5v and pin 12 of the ELM325 (which is the re or receiver enable output). in this way, you could show that power is on, and that the rs485 receiver is also enabled (so the ELM325 is ready). if you do not use the pin 12 output to enable the rs485 receiver, then the re output could be dedicated to the control of the led from your software. this presents several opportunities for providing feedback to the user. there are really very few connections to the ELM325 itself. a crystal is needed to maintain the timekeeping functions (a ceramic resonator might also be used, with only a slight reduction in frequency accuracy). either way, the frequency required is that of an ntsc ?olourburst?signal. that is, it needs to be 3.579545 mhz. this is often shortened to simply 3.58 mhz. loading capacitors c1 and c2 are shown connected to the crystal. your values may vary slightly from this, but 27 pf provides about 15 to 20 pf of crystal loading, which is what is typically required. four leds are shown connected to the ELM325 through current limiting resistors. 470 w is likely a good starting point for the resistor as that allows 4 to 5 ma of led current, but you may want to change the value depending on the chosen v dd , and whether you want a different brightness. this might be an idea if you wish to reduce total current consumption for the circuit, for example. note that the perceived brightness will not change that much if you increase the current from that shown (but you are free to try it). u2 (a standard rs485 transceiver ic) is shown connected to pins 11, 12 and 13 of the ELM325. if you plan to operate with the transceiver enabled at all times, then you really don? need the connection from pin 12 of the ELM325 to pin 2 of the ds485. simply leave pin 12 open-circuited, and connect u2 pin 2 to circuit common to have the transceiver constantly enabled. while we show a ds485 integrated circuit for the interface ic, there are many rs485 transceiver ics on the market. the ds485 shown is produced by national semiconductor (www.national.com), as is the ds75176b, and the ds36277. maxim semiconductor (www.maxim-ic.com) produces the max483/487 family of parts, while linear technology makes parts like the ltc485. analog devices (www.analog.com) makes parts like the adm485 family, the adm2582e and adm2587e, as well as the adm2484e. be sure to see texas instruments (www.ti.com) for devices like the sn65hvd3080e. these are all very capable devices. no matter which transceiver ic that you decide on, it needs to be connected to the j1708 bus through an r-c network as shown (c6, c7 and r6 to r9). this network is specified in the sae j1708 standard so should be adhered to. it provides some filtering for slew rate limiting and protection, as well as pullup and pulldown for the j1708 data bus. note that while rs485 systems normally use terminating resistors between the two signal wires (ie. data lines), the j1708 standard specifically states that terminating resistors such as that are not to be used. the final part of figure 7 is the serial to usb converter, u4 (a db9-usb-d5-f), which is a product of future technology devices international which is also known as ftdi (see www.ftdichip.com). this is a handy little circuit that is built into a db9 shell (that is, free datasheet http:///
3 4 example applications (continued) 24 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com figure 7. a j1708 to usb interpreter 2 (rxd) x1 3.579 mhz c2 27pf usb interface (mini b) j1708 interface r1-4 470 w +5v c1 27pf 3 (txd) 5 (sg) 1 (dcd) 4 (dtr) 6 (dsr) 7 (rts) 8 (cts) +5v 1 2 ds485 325 1 2 3 4 5 6 7 8 9 10 11 12 13 14 u1 l1-l4 c6 2.2nf u2 r5 470 w +5v c5 0.1? ?ower l5 + battery positive c (b) ground +5v c4 0.01? d1 1n4002 u3 7805 c3 10? 50v in out com ftdi db9-usb- d5-f 9 (ri) +5v r10 4.7k w d2 1n4148 note: the terminal labels are for a 6 pin deutsch connector (the 9 pin connections are shown in brackets) e (a) a (f) b (g) j1708 + j1708 - r7 47 w r6 47 w c7 2.2nf r9 4.7k w +5v r8 4.7k w u4 5 6 7 8 free datasheet http:///
capacitors (16v or greater, except as noted) c1, c2 = 27pf c3 = 10? 50v c4 = 0.01uf c5 = 0.1? c6, c7 = 2.2nf (2200pf) misc x1 = 3.579545 mhz crystal 6 or 9 pin deutsch connector 8 pin dip socket 14 pin dip socket semiconductors d1 = 1n4001 d2 = 1n4148 l1, l2, l3, l4 = yellow led l5 = green led u1 = ELM325 u2 = ds485 (rs485 transceiver) u3 = 7805 (5v, 1a regulator) u4 = ftdi dbp-usb-d5-f (usb i/f) resistors (1/8w or greater) r1, r2, r3, r4, r5 = 470 w r6, r7 = 47 w r8, r9, r10 = 4.7 k w 25 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com figure 8. parts list for figure 7 it looks like a 9 pin serial connector, with a mini usb socket where the cable normally connects). it obtains it? power from the pc through the usb cable, so is not a burden on the ELM325 circuit. in fact, the ftdi module will even try to power the ELM325 when connected, which is why we added d2 and r10 ?to block any reverse current from flowing back into the ELM325. there isn? much more that that we can say about the ftdi module, except that it works as advertised, and works well. it requires software to be installed before you can use it, but that is available at their web site (www.ftdichip.com) for macintosh, windows, and linux. go to drivers, then choose vcp drivers for the needed virtual com port support. once the software is installed, you may ?alk?to the ELM325 circuit with standard serial interface software (such as hyperterminal or zterm), or with custom interface software. there are other rs232 to usb solutions available such as the cp2102 from silicon laboratories (www.silabs.com), or you might try other devices such as a bluetooth or wi-fi module. we only show the ftdi product here as one possible option. the final circuit that we offer is that of figure 9. it is identical to that in figure 7, except that we show a discrete rs232 interface connected to the ELM325? pins 5 and 6. this circuit is more than adequate for this application, and is relatively low in cost. (it is also the same as the one that we suggest with our elm327 and elm329 integrated circuits.) of course, if you want to reduce the amount of wiring, you may wish to consider products like the max232 family from maxim integrated products (www.maxim-ic.com), and similar devices. that should get you started with the ELM325. it actually needs very few components to make a fully functioning circuit, so should not be that difficult or expensive to build. if you should need help, check the help pages on our web site, or write an email to our technical support (techsupport@elmelectronics.com) and we?l do what we can to get you going. example applications (continued) free datasheet http:///
3 4 ELM325 26 of 31 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com example applications (continued) figure 9. an rs232 serial interface 2 (rxd) rs232 interface (db9f) +5v 3 (txd) 5 (sg) 1 (dcd) 4 (dtr) 6 (dsr) 7 (rts) 8 (cts) 4.7k w 10k w 10k w 1n4148 1n4148 0.1? +5v 4.7k w 10k w 2n3906 2n3904 3.579 mhz 27pf j1708 interface 4 x 470 w +5v 27pf +5v 1 2 ds485 325 1 2 3 4 5 6 7 8 9 10 11 12 13 14 u1 2.2nf 470 w +5v 0.1? ?ower + battery positive c (b) ground +5v 0.01? 1n4002 u3 7805 10? 50v in out com note: the terminal labels are for a 6 pin deutsch connector (the 9 pin connections are shown in brackets) e (a) a (f) b (g) j1708 + j1708 - 47 w 47 w 2.2nf 4.7k w +5v 4.7k w 5 6 7 8 free datasheet http:///
27 of 31 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com ELM325 tester connectors the tester that you make will need to connect to the vehicle? diagnostics port using a cable and special connector. you may need a few connectors for this, as the types used by the manufacturers have varied over the years. the two most common ones that you will find are the 6 pin, and the 9 pin ?eutsch?connectors. deutsch industrial is a multinational company that makes products for use in harsh environmental conditions. the following shows the pin configurations for the ?eutsch?connectors, and lists part numbers for each. should you wish to make your own connectors, you 6 pin ?eutsch?test connector (looking into the open end) a b c d e f 9 pin ?eutsch?test connector (looking into the open end) shell # 12 socket pins deutsch industrial amphenol sine systems hd16-6-12s or hd16-6-96s ahd16-6-12s (889-1064-nd) or hd16-6-12s-b010 (889-1063-nd) at62-210-1231 (889-1053-nd) or 65-54748 (889-1057-nd) 1062-12-0122 will need to buy a shell (or casing) as well as the metal pins to insert into it. while the deutsch industrial products are what is normally specified for these connectors, you may find the amphenol parts to be an acceptable alternative and possibly easier to obtain in your area. we provide a digi-key (www.digikey.com) part number in brackets under each amphenol part to help you if ordering from them. shell # 16 socket pins deutsch industrial amphenol sine systems hd16-9-1939s ahd16-9-1939s (889-1059-nd) at62-16-0622 (at62-16-0622-nd) or at62-16-0122 (889-1049-1-nd) or 65-54757 (889-1055-nd) 1062-12-0122 a b c d e f g h j free datasheet http:///
error messages and alerts buffer full the ELM325 provides an internal memory space (or ?uffer? for temporarily storing data bytes before they are transmitted as rs232 data. the state of this buffer is continually monitored and a warning is given if it should become full (as data will be lost if that continues). if you are receiving buffer full messages, then you may be trying to connect to a system that is operating at a non-standard baud rate, or possibly has excessive noise. you may reduce the amount of data transmitted (and so reduce the amount of data that needs to be put into the buffer) by setting the filters to only show specific data. you might also try setting checksums off (at c0), spaces off (at s0) and possibly error messages off (at em0) to reduce the amount of data being sent. bus busy messages provided to the ELM325 are sent after a certain time passes (based on the message priority), and while no other device is sending. if another device should begin sending at the same time as the ELM325, then both devices will stop, wait some time, and attempt a resend. usually, this is sufficient to allow a message to be successfully sent, but should the ELM325 not be successful after a few seconds, it will stop trying and report that the bus is too busy. if this occurs, you will need to determine if there is a problem (eg. possibly in the wiring), and decide if you wish to try again. ELM325 will print stop? then return to the prompt state. if you should see this response, then something that you have done has interrupted the ELM325. ? this is the standard response for a misunderstood command received on the rs232 input. usually it is due to a typing mistake, but it can also occur if you try to do something that is not appropriate for the command (for example, the at gm command will give an error if a filter has not been set). the following describes the messages that this version of the ELM325 sends to tell you of a problem. 28 of 31 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com ELM325 free datasheet http:///
29 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com outline diagrams the diagrams at the right show the two package styles that the ELM325 is available in. the first shows our ELM325p product in what is commonly known as a 300 mil plastic dip (or pdip) package. it is used for through hole applications. the ELM325sm package shown at right is our surface mount option. it is 3.90 mm wide (or 150 mils) and is known as a narrow small outline ic (or soic) package. we have chosen to simply refer to it as an sm (surface mount) package. the drawings shown here provide the basic dimensions for these ics only. please refer to the following microchip technology inc. documentation for more detailed information: ?the microchip packaging specification , document name en012702.pdf (7.5mb). at the home page (www.microchip.com), select design support then documentation then packaging specifications, or go to www.microchip.com/packaging ?the pic12(l)f1822/pic16(l)f1823 data sheet , file name 41413c.pdf (7 mb). at the www.microchip.com home page, use the search data sheets box to look for 16f1823. note: all dimensions shown are in mm. ELM325p ELM325sm 3.90 free datasheet http:///
e electrical characteristics, 4 error messages and alerts, 28 example applications basic, 23 figure 7 (usb), 24 figure 7 parts list, 25 figure 9 (rs232), 26 f features, 1 figure 7, 24 filtering, receive, 14-15 filters, automatic receive, 17 g getting trouble codes, 15 i interfaces, microprocessor, 22 j j1587 commands, 12 number of responses, 16, 20 j1922, about, 21 l listening to a vehicle, 13 m making requests, 16 maximum ratings, absolute, 4 index a about j1922, 21 absolute maximum ratings, 4 amphenol connectors, 27 applications, example, 23-26 at commands descriptions, 8-10 introduction, 7 sending, 11 summary, 7 at st command, 10, 20 automatic receive filters, 17 b block diagram, 1 buffer full, 28 bus busy, 28 c codes, getting trouble, 15 commands, at descriptions, 8-10 summary, 7 commands, j1587, 12 communicating with the ELM325, 5-6 connectors, tester, 27 contents, 2 connection diagram, 1 copyright and disclaimer, 2 d data error, 28 description and features, 1 diagrams, outline, 29 disclaimer and copyright, 2 deutsch connector, 27 30 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com free datasheet http:///
index (continued) m (continued) message filtering, 14, 17 messages, error, 28 microprocessor interfaces, 22 mid, setting the, 18 monitoring the bus, 13 multiline responses, 18-19 n no data, 28 number of responses, 16, 20 o order, restoring, 21 ordering information, 29 outline diagrams, 29 overview, how to use the ELM325, 5 p pdip, 29 pin descriptions, 3 prot error, 28 r reading trouble codes, 15 receive filtering, 14-15 receive filters, automatic, 17 responses, multiline, 18-19 restoring order, 21 requests, making, 16 rx error, 28 s sending at commands, 11 setting filters, 14-15 the mid, 18 timeouts, 20 specify the number of responses, 16, 20 stop?, 28 summary, at commands, 7 t tester connectors, 27 timeouts, setting, 20 trouble codes, getting, 15 u using the ELM325, 5 31 of 31 ELM325 ELM325dsa elm electronics ?circuits for the hobbyist www.elmelectronics.com free datasheet http:///


▲Up To Search▲   

 
Price & Availability of ELM325

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X